<%@ page import="com.dingpeikeji.quickdeer.modules.rentproduct.entity.TDemands" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="REACTSTATUS_WAIT" value="<%=TDemands.REACTSTATUS_WAIT %>" />
<c:set var="REACTSTATUS_DONE" value="<%=TDemands.REACTSTATUS_DONE %>" />
<c:set var="REACTSTATUS_SURE" value="<%=TDemands.REACTSTATUS_SURE %>" />
<html>
<head>
	<title>需求报价管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript" src="${ctxStatic }/cityselector/cityselect.js" ></script>
	<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
<script>
	$(function() {
	// 初始化站点选择框
	$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,b'}, function(data) {
		var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
		new Vcity.CitySelector({input:'destcity_sitename',cityData:allCity});
	});
})
	</script>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<style type="text/css">
	input, .uneditable-input {
		height:30px !important;
	    display: inline-block;
	    padding: 4px 6px;
	    margin-bottom: 10px;
	    font-size: 14px;
	    line-height: 20px;
	    color: #555555;
	    vertical-align: middle;
	    -webkit-border-radius: 4px;
	    -moz-border-radius: 4px;
	    border-radius: 4px;
	}
	.Wdate {
	    height:30px !important;
	    border: #999 1px solid;
	    background: #fff url(datePicker.gif) no-repeat right ;
	    background-color: rgb(255, 255, 255);
	}
	
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rentproduct/demandsPrice/waitlist">需求报价列表</a></li>
		<li><a href="${ctx}/rentproduct/demandsPrice/busreactlist">已报价列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="tDemands" action="${ctx}/rentproduct/demandsPrice/waitlist" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div class="control-group">
		<label class="control-label">订单日期：</label> <input type="text"
				id="createDateQueryStart" name="createDateQueryStart" maxlength="20" 
				readonly class="input-small Wdate"
				value="${tDemands.createDateQueryStart }"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'createDateQueryEnd\')}'});" />
			至&nbsp; <input type="text" id="createDateQueryEnd"
				name="createDateQueryEnd" maxlength="20" readonly
				class="input-small Wdate" value="${tDemands.createDateQueryEnd }"
				onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'createDateQueryStart\')}'});" />
				<label class="control-label">目的地：</label>
				<input type="text" class="input-small digit" id="destcity_sitename" data-autocity="yes"  name="destcity.sitename" value="" placeholder="请输入目的地" autocomplete="off"/>
				<input type="hidden" name="destcity.siteid" value="" >
				<input class="btn btn-primary" type="submit" value="查询" />
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>用车时间</th>
				<th>发布时间</th>
				<th>车型</th>
				<th>包车数量</th>
				<th>包车天数</th>
				<th>出发地</th>
				<th>目的地</th>
				<th>响应状态</th>
				<shiro:hasPermission name="rentproduct:demandsPrice:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="tDemands">
			<tr>
				<td>
					<fmt:formatDate value="${tDemands.fromdate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					<fmt:formatDate value="${tDemands.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${tDemands.cartype.typename}
				</td>
				<td>
					${tDemands.vehiclenum}
				</td>
				<td>
					${tDemands.rentdays}
				</td>
				<td>
					${tDemands.departcity.sitename}
				</td>
				<td>
					${tDemands.destcity.sitename}
				</td>
				<td>
				${fns:getDictLabel(tDemands.reactstatus, 'reactstatus', '无')}
				</td>
				<shiro:hasPermission name="rentproduct:demandsPrice:edit">
					<td>
						<a href="${ctx}/rentproduct/demandsPrice/form?demandid=${tDemands.demandid}">查看</a>
					</td>
				</shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>